﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Microsoft.Popfly.GameCreator.GameEngine
{
    public class CopyableConsoleDialog : Dialog
    {
        string m_text;
        public CopyableConsoleDialog(string message)
        {
            m_text = message;
        }
        protected override FrameworkElement GetContent()
        {
            StackPanel stackPanel = new StackPanel();

            Button button = new Button();
            button.Content = "Close";
            button.Click += new RoutedEventHandler(button_Click);
            stackPanel.Children.Add(button);

            TextBox box = new TextBox();

            box.Text = m_text;

            stackPanel.Children.Add(box);
            return stackPanel;
        }

        void button_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }
    }
}
